package com.alibaba.middleware.race.rpc.netty;

import java.util.Map;

import com.alibaba.middleware.race.rpc.async.ResponseCallbackListener;
import com.alibaba.middleware.race.rpc.model.RpcRequest;
import com.alibaba.middleware.race.rpc.model.RpcResponse;


public interface RpcConnection {
	RpcResponse sendRequest(RpcRequest request) throws Throwable;
	RpcResponse sendRequest(RpcRequest request,Map<String,ResponseCallbackListener> map) throws Throwable;

	void connection() throws Throwable;

	void close() throws Throwable;

	boolean isConnected();

	boolean isClosed();
	void clear();
}
